import { createRouter, createWebHistory } from "vue-router";

const routes = [
  { path: "/", redirect: "/h5/login" },
  {
    path: "/h5",
    redirect: "/h5/login",
  },
  {
    path: "/h5/login",
    component: () => import("@/view/login/login.vue"),
    name: "login",
    meta: {
      title: "登录",
    },
  },
  {
    path: "/h5/home",
    component: () => import("@/view/home/home.vue"),
    name: "home",
    meta: {
      title: "首页",
    },
  },
  {
    path: "/h5/mine",
    component: () => import("@/view/mine/mine.vue"),
    name: "mine",
    meta: {
      title: "我的",
    },
  },
  {
    path: "/h5/product",
    component: () => import("@/view/product/product.vue"),
    name: "product",
    meta: {
      title: "产品",
    },
  },
  {
    path: "/h5/detail",
    component: () => import("@/view/home/itemDetail.vue"),
    name: "detail",
    meta: {
      title: "产品详情",
    },
  },
  {
    path: "/h5/insure",
    component: () => import("@/view/home/insure/zj_jg/insure.vue"),
    name: "insure",
    meta: {
      title: "紫金不记名建工意外险",
    },
  },
  {
    path: "/h5/insure/share",
    component: () => import("@/view/home/insure/zj_jg/share.vue"),
    name: "share",
    meta: {
      title: "分享",
    },
  },
  {
    path: "/h5/mine/payOrder",
    component: () => import("@/view/mine/payOrder/payOrder.vue"),
    name: "payOrder",
    meta: {
      title: "待支付订单",
    },
  },
  {
    path: "/h5/mine/payOrderDetail",
    component: () => import("@/view/mine/payOrder/payOrderDetail.vue"),
    name: "payOrderDetail",
    meta: {
      title: "确认投保信息",
    },
  },
  {
    path: "/h5/mine/editPsd",
    component: () => import("@/view/mine/editPsd.vue"),
    name: "editPsd",
    meta: {
      title: "修改密码",
    },
  },
  {
    path: "/h5/mine/achievement",
    component: () => import("@/view/mine/achievement/achievement.vue"),
    name: "achievement",
    meta: {
      title: "我的业绩",
    },
  },
  {
    path: "/h5/home/notice",
    component: () => import("@/view/home/notice/notice.vue"),
    name: "notice",
    meta: {
      title: "公告列表",
    },
  },
  {
    path: "/h5/home/noticeDetail",
    component: () => import("@/view/home/notice/noticeDetail.vue"),
    name: "noticeDetail",
    meta: {
      title: "公告详情",
    },
  },
  {
    path: "/h5/insure/zj_dqyw",
    component: () => import("@/view/home/insure/zj/zj_dqyw.vue"),
    name: "zj_dqyw",
    meta: {
      title: "紫金短期施工记名意外险",
    },
  },
  {
    path: "/h5/insure/zj_sxs",
    component: () => import("@/view/home/insure/zj_sxs/zj_sxs.vue"),
    name: "zj_sxs",
    meta: {
      title: "紫金短期实习生意外险",
    },
  },
  {
    path: "/h5/insure/zz_jgyq",
    component: () => import("@/view/home/insure/zz_jgyq/zz_jgyq.vue"),
    name: "zz_jgyq",
    meta: {
      title: "紫金建工一切险",
    },
  },
  {
    path: "/h5/insure/zz_gz",
    component: () => import("@/view/home/insure/zz_gz/zz_gz.vue"),
    name: "zz_gz",
    meta: {
      title: "短期公众责任保险",
    },
  },
  {
    path: "/h5/insure/dd_jgyq",
    component: () => import("@/view/home/insure/dd_jgyq/dd_jgyq.vue"),
    name: "dd_jgyq",
    meta: {
      title: "大地建工一切险",
    },
  },
  {
    path: "/h5/insure/dd_ccyqx",
    component: () => import("@/view/home/insure/dd_ccyqx/dd_ccyqx.vue"),
    name: "dd_ccyqx",
    meta: {
      title: "大地商户财产一切险",
    },
  },
  {
    path: "/h5/insure/dd_gz",
    component: () => import("@/view/home/insure/dd_gz/dd_gz.vue"),
    name: "dd_gz",
    meta: {
      title: "大地公众责任险",
    },
  },
  {
    path: "/h5/insure/dd_jggzx",
    component: () => import("@/view/home/insure/dd_jggzx/dd_jggzx.vue"),
    name: "dd_jggzx",
    meta: {
      title: "大地建工雇主险",
    },
  },
  {
    path: "/h5/bd/bdDetail",
    component: () => import("@/view/mine/bd/bdDetail.vue"),
    name: "bd",
    meta: {
      title: "保单详情",
    },
  },
  {
    path: "/h5/article",
    component: () => import("@/view/home/article.vue"),
    name: "条款",
    meta: {
      title: "条款",
    },
  },
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});
export default router;
